<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>2.事件对象</title>
    <!-- 引入Vue -->
    <script type="text/javascript" src="../../vue.js"></script>
  </head>
  <body>
    <!-- 准备好一个容器-->
    <div id="demo">
      <h2>{{school}}坐落于{{address}}</h2>
      <button v-on:click="showTel">查看联系方式1</button>
      <button @click="showTel">查看联系方式2</button>
    </div>

    <script type="text/javascript">
      let vm = new Vue({
        el:'#demo',
        data:{
          school:'尚硅谷',
          address:'宏福科技园',
          tel:'010-56253825',
        },
        methods:{
          showTel(event){
            // console.log('@',this)
            alert(this.tel)
            // console.log(event)
          }
        }
      })
      // console.log(vm)
      
    </script>
  </body>
</html>